home *** CD-ROM | disk | FTP | other *** search
- #include <iostream.h>
- #include "A.H"
-
- // File A.C
-
- A::A (A *n)
- {
- next = n;
- cout << "A::constructed" << endl;
- }
-
- A::~A ()
- {
- cout << "A::destructed" << endl;
- }
-
- void A::doIt (void)
- {
- cout << "A::doIt" << endl;
- }
-
- void A::setNext (A *n)
- {
- next = n;
- }
-
- void A::doItNext (void)
- {
- if (next != NULL)
- {
- next->doIt();
- }
- }
-